package com.example.gameex2;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class AppManager {
	private static AppManager s_instance;
	
	private GameView m_gameView;
	private Resources m_resources;
	
	public static AppManager getInstance()
	{
		if(s_instance == null)
		{
			s_instance = new AppManager();
		}
		return s_instance;
	}
	
	public Bitmap GetBitmap(int r)
	{
		return BitmapFactory.decodeResource(m_resources, r);
	}
	
	void SetGameView(GameView _gameview)
	{
		m_gameView = _gameview;
	}
	
	public GameView GetGameView()
	{
		return m_gameView;
	}
	
	void SetResources(Resources _resource)
	{
		m_resources = _resource;
	}
	
	public Resources GetResources()
	{
		return m_resources;
	}
}
